import 'package:flutter/material.dart';

class AppConst {
  ///
  ///
  ///
  /// 是否是发布版本
  ///
  ///
  ///
  static const bool APP_IS_RELEASE = true;

  ///
  /// 是否是第一次登陆
  ///
  static const String APP_IS_FIRST = "APP_IS_FIRST";

  ///
  /// 是否已经登陆
  ///
  static const String APP_IS_LOGIN = "APP_IS_LOGIN";

  static const String KEY_user_token = "KEY_user_token";
}

enum FamilyEnum {
  normal,
  medium,
  bold,
}

class AppFont {
  static TextStyle textStyle(double fontszie,
      {FontWeight fontWeight = FontWeight.normal,
      Color color = Colors.black,
      TextDecoration decoration = TextDecoration.none}) {
    return TextStyle(
      fontSize: fontszie,
      color: color,
      fontWeight: fontWeight,
      decoration: decoration,
    );
  }
}

class AppColor {
  static const Color mainColor = Color(0xffE5C75A);
  static const Color green = Color(0xff1BAF82);
  static const Color red = Color(0xffE82D2D);
  static const Color grey = Color(0xfff9f9f9);
  static const Color yellow = Color(0xffFFB819);

  /// f9f9f9
  static const Color f9f9f9 = Color(0xfff9f9f9);
  static const Color ccc = Color(0xfffcccccc);

  /// a5a5a5
  static const Color fontgrey = Color(0xffa5a5a5);
  static const Color font666 = Color(0xff666666);
  static const Color font333 = Color(0xff333333);

  /// f3f3f3
  static const Color divigrey = Color(0xfff3f3f3);
}

Map<int, Color> color = {
  50: AppColor.mainColor.withOpacity(.1),
  100: AppColor.mainColor.withOpacity(.2),
  200: AppColor.mainColor.withOpacity(.3),
  300: AppColor.mainColor.withOpacity(.4),
  400: AppColor.mainColor.withOpacity(.5),
  500: AppColor.mainColor.withOpacity(.6),
  600: AppColor.mainColor.withOpacity(.7),
  700: AppColor.mainColor.withOpacity(.8),
  800: AppColor.mainColor.withOpacity(.9),
  900: AppColor.mainColor.withOpacity(.1),
};
MaterialColor colorCustom = MaterialColor(0xffE5C75A, color);
